package com.jyh.controller.basicBi;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jyh.config.BaseAction;
import com.jyh.service.basicBi.DataRecoveryService;

@Controller
@RequestMapping(value = "/recovery")
public class DataRecoveryController extends BaseAction{
	@Autowired
	private DataRecoveryService recoveryService;
	
	/**
	 * 
	 * @return
	 */
	@RequestMapping(value = "/tecoveryPage")
	public String login() {
		return "/channel/dataRecovery";
	}
	
	
	/**
	 * 后门---渠道投资日报
	 */
	@RequestMapping(value = "/backdoorTrot1")
	public String backdoorTrot1(HttpServletRequest request, HttpSession session) {
		try {
			logger.info("begin");
			String time1 = request.getParameter("timeday1");
			String time2 = request.getParameter("timeday2");
			recoveryService.backdoorTrot1(time1, time2, session);
			return "/channel/dataRecovery";
		} catch (Exception e) {
			e.printStackTrace();
			logger.error("\n -------------error信息开始-------------- \n" + e
					+ "\n -----------------error信息结束------------------\n\n");
			return null;
		}
	}
}
